/**
 * 适配器模式
 */

class Target {
    constructor() {
        this.adaptee = new Adaptee()
    }
    
    request() {
        const info = this.adaptee.specificRequest()
        return `${info} — 转换器 — 中国插头`
    }
}

class Adaptee {
    specificRequest() {
       return '德国标准插头'
    }
}

function test() {
    const target = new Target()
    const res = target.request()
    console.log(res);
}

console.log('----------------适配器模式-------------------')
test()